package com.wangjialu.learner.order.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * <p></p>
 *
 * @author WangJialu
 * @since 2021/6/22 23:52
 */
@RestController
@Slf4j
public class OrderZkController {

    @Resource
    private RestTemplate restTemplate;

    public static final String PAYENT_URL = "http://cloud-payment-service";

    @GetMapping("/consumer/payment/zk")
    public String getpaymentInfo() {
        String res = restTemplate.getForObject(PAYENT_URL + "/payment/zk", String.class);
        return res;
    }
}
